//
//  ShenQingJiLvCell.swift
//  demo
//
//  Created by HAip on 2020/2/19.
//  Copyright © 2020 CodeYu. All rights reserved.
//

import UIKit

class ShenQingJiLvCell: UITableViewCell {
    
    let logoImg = UIImageView()
    
    let carNumLab = UILabel().then{
        $0.textColor = UIColor.black
        $0.font = UIFont.systemFont(ofSize: 16)
    }
    
    let companyLab = UILabel().then{
        $0.textColor = UIColor.orange
        $0.font = UIFont.systemFont(ofSize: 14)
    }
    
    let timeLab = UILabel().then{
        $0.textColor = UIColor.gray
        $0.font = UIFont.systemFont(ofSize: 13)
    }
    
    let addressLab = UILabel().then{
        $0.textColor = UIColor.gray
        $0.font = UIFont.systemFont(ofSize: 13)
    }
    
    let statusLab = UILabel().then{
        $0.textColor = UIColor.gray
        $0.font = UIFont.systemFont(ofSize: 14)
    }
    
    
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        makeViewsContrains()
    }
    
    func makeViewsContrains(){
        self.addSubview(logoImg)
        self.addSubview(carNumLab)
        self.addSubview(companyLab)
        self.addSubview(timeLab)
        self.addSubview(addressLab)
        self.addSubview(statusLab)

        logoImg.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(15)
            make.top.equalToSuperview().offset(20)
        }
        carNumLab.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(16)
            make.left.equalTo(logoImg.snp.right).offset(15)
        }
        companyLab.snp.makeConstraints { (make) in
            make.left.equalTo(carNumLab)
            make.top.equalTo(carNumLab.snp.bottom).offset(12)
        }
        timeLab.snp.makeConstraints { (make) in
            make.left.equalTo(carNumLab)
            make.top.equalTo(companyLab.snp.bottom).offset(12)
            make.bottom.equalToSuperview().offset(-20)
        }
        statusLab.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(-15)
        }

    }
    
    func configData() {
        logoImg.image = UIImage(named: "biaozhi")
        carNumLab.text = "苏A 234K23"
        companyLab.text = "中数据开发有限公司"
        timeLab.text = "11-23 14:33"
        addressLab.text = "河南省"
        statusLab.text = "审核中"
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    

}
